package com.fuyao.cloud.asset.vo.purchaseorder;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fuyao.cloud.asset.util.AssetUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 资产分类导出类
 *
 * @author lyhil
 * @date 2021/11/17
 */
@Data
@ColumnWidth(25)
@ApiModel(value = "采购信息导出对象")
public class PurchaseOrderExcelVO {

	private static final long serialVersionUID = 1L;

	// ：默认为0{0：草稿、1：处理中、2：已审批、3：已完成、4：作废}
	@ExcelProperty(value = "状态")
	private String status;

	// ：默认为ALL{ DEVICE:资产类；CONSUMABLES：易耗品；All:混合}
	@ExcelIgnore
	@ApiModelProperty(value = "单据类型")
	private String type;

	@ExcelProperty(value = "采购单号")
	private String caseid;

	@ExcelProperty(value = "采购人")
	private String createBy;

	@ExcelProperty(value = "订购时间")
	private LocalDateTime orderDatetime;

	@ExcelProperty(value = "采购时间")
	private LocalDateTime createTime;

	@ExcelProperty(value = "采购单位")
	private String deptFullname;

	@ExcelProperty(value = "合同或发票名称")
	private String contractName;

	@ExcelProperty(value = "供应商名称")
	private String supplierName;

	@ExcelProperty(value = "收货信息")
	private String receivinfo;

	@ExcelProperty(value = "申请单号")
	private String parentCaseid;

	@ExcelProperty(value = "到货时间")
	private LocalDateTime arrivalDatetime;

	// 01：邀标、02：自采:03：政府采购
	@ExcelProperty(value = "采购方式")
	private String method;

	@ExcelProperty(value = "订单金额")
	private BigDecimal amount;

	// 默认人民币：人民币：、欧元：欧元、美元：美元、法元：法元
	@ExcelProperty(value = "货币类型")
	private String currencyType;

	@ExcelProperty(value = "订单明细")
	private String detailed;

	@ExcelProperty(value = "订单说明")
	private String explains;

	public String getDetailedEx() {
		return AssetUtils.formatDetailed(this.detailed);
	}

	public String getStatusCn() {
		return AssetUtils.formatStatus(this.status);
	}
}
